import { reactive, ref } from "vue";
export default function InitHook() {
  const staticResource = ref<Base.GeneraDataType>({});
  const formState = reactive<Base.GeneraDataType>({
    username: undefined,
    password: undefined,
    clientType: "MANAGE",
    remember: true
  });

  const dialogOpts = reactive<Base.DialogOpts>({
    title: "",
    width: "520px",
    component: "",
    visible: false,
    type: 1,
    passData: {}
  });
  // const changeClientType = () => {
  //   formState.clientType = formState.clientType === "MANAGE" ? "CUSTOMER" : "MANAGE";
  // };
  return {
    formState,
    // changeClientType,
    staticResource,
    dialogOpts
  };
}
